Mode Number = (CPOL << 1) | CPHA


SPI Mode CPOL CPHA Clock Idle Data Shifted On Data Sampled On
0 0 0 LOW Falling edge + when SS activates Rising edge
1 0 1 LOW Rising edge Falling edge
2 1 0 HIGH Rising edge + when SS activates Falling edge
3 1 1 HIGH Falling edge Rising edge

Notes: